package com.ttg.common.enums;

/**
 * Description： 质量管理分类枚举
 * Author: chenyou
 * Date: 2025/8/27 16:18
 * Company: ttg
 * Copyright: Copyright (c) 2025
 */
public enum QualityRuleTypeEnum {

    鼓励类(1,0,"鼓励类"),

    支持类(2,0,"支持类"),

    准入类(3,0,"准入类"),

    关注类_低归集(4,1,"关注类(低归集)"),

    关注类_高成本(4,2,"关注类(高成本)"),

    关注类_低活跃(4,3,"关注类(低活跃)"),

    提质类(5,0,"提质类"),

    审慎类_低归集(6,1,"审慎类(低归集)"),

    审慎类_高成本(6,2,"审慎类(高成本)"),

    审慎类_低活跃(6,3,"审慎类(低活跃)"),

    退出类(7,0,"退出类"),
    ;

    QualityRuleTypeEnum(int type,int subType, String desc) {
        this.type = type;
        this.subType = subType;
        this.desc = desc;
    }

    private int type;
    private int subType;
    private String desc;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getSubType() {
        return subType;
    }

    public void setSubType(int subType) {
        this.subType = subType;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }


    public static QualityRuleTypeEnum getByVal(int type,int subType){
        for(QualityRuleTypeEnum curr:QualityRuleTypeEnum.values()){
            if(curr.type==type&&curr.subType==subType){
                return curr;
            }
        }
        return null;
    }
}
